<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
	<head>
		<title>修改密码</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<LINK href="<%=request.getContextPath()%>/css/cssCn.css"
			type="text/css" rel="stylesheet">
		<%@ include file="/comm.jsp"%>
		<script>
	function changePwd(){
		//校验密码长度、二次输入密码是否相等
		var passwordVal=$d("password").value;
		var newPasswordVal=$d("password1").value;
		var params = {
					password:passwordVal,
					newPassword:newPasswordVal
					};
		$.ajax({type: "POST",
		       url: "ajaxUser_changePwd.do",
		       data: params,
		       async: false,
		       success: function(result){
				 if(result.retcode=="0000"){
				  	errSpan.innerHTML=result.retmsg;
				 }else{
				  	errSpan.innerHTML=result.retmsg;
				 }
			  }
			},"json");
		$d("password").value="";
		$d("password1").value="";
		$d("password2").value="";
	}
</script>
	</head>
	<body leftmargin="0" topmargin="0" marginheight="0">
		<s:form name="formpage" action="" namespace="/">
			<s:token>
			</s:token>
			<%@ include file="/messages.jsp"%>
			<div id="put_div">
				<table width="600" align="left">
					<tr>
						<td colspan="2">
							<span id="errSpan"></span>
						</td>
					</tr>
					<tr>
						<td nowrap="nowrap" align="right">
							账户名：
						</td>
						<td>
							${currentUser.userId }
						</td>
					</tr>
					<tr>
						<td align="right">
							当前密码：
						</td>
						<td>
							<input name="password" id="password" type="password" size="20"
								maxlength="20" class="required" value="" title="*必填" />
						</td>
					</tr>
					<tr>
						<td align="right">
							新密码：
						</td>
						<td>
							<input name="password1" id="password1" type="password" size="20"
								maxlength="20" class="required" value="" title="*必填" />
						</td>
					</tr>
					<tr>
						<td align="right">
							请再次输入新密码：
						</td>
						<td>
							<input name="password2" id="password2" type="password" size="20"
								maxlength="20" class="required" value="" title="*必填" />
						</td>
					</tr>
					<tr>
						<td colspan="2" align="center">
							<input type="button" class="button" id="ok" name="ok"
								value=" 修改 " onclick="changePwd();" />
						</td>
					</tr>
				</table>
			</div>
			<!-- end #pub_div -->
		</s:form>
		<!-- 
		<%@ include file="/button.jsp"%>
		 -->
	</body>
</html>
